package cn.studyjava.verify.common.result;

import java.io.Serializable;

public class JsonResult<T> implements Serializable{

	/**
	 * @fieldName: serialVersionUID
	 * @fieldType: long
	 * @Description: TODO
	 */
	private static final long serialVersionUID = 6054421629120979680L;

	private int status;
	
	private String code;

	private String msg;
	
	private T data;
	
	public JsonResult(int status, String code, String msg) {
		this.status = status;
		this.code = code;
		this.msg = msg;
	}
	
	public JsonResult(int status, String code, String msg, T t) {
		this.status = status;
		this.code = code;
		this.msg = msg;
		this.data = t;
	}

	/**
	 * @return the status
	 */
	public int getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(int status) {
		this.status = status;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the msg
	 */
	public String getMsg() {
		return msg;
	}

	/**
	 * @param msg the msg to set
	 */
	public void setMsg(String msg) {
		this.msg = msg;
	}

	/**
	 * @return the data
	 */
	public T getData() {
		return data;
	}

	/**
	 * @param data the data to set
	 */
	public void setData(T data) {
		this.data = data;
	}
}
